#!/bin/sh

# Author: Zhang Huangbin (michaelbibby <at> gmail.com)

# Variables for Postfix and related.

# Set 'message_size_limit', in 'byte'. Default is 10M.
export MESSAGE_SIZE_LIMIT='15728640'

# virtual_maildir_limit_message.
export MAILDIR_LIMIT_MESSAGE="Sorry, the user's maildir has overdrawn the disk quota, please notice the user and try again later."

#
# You do *NOT* need to modify them.
#
# ---- Postfix ----
# You do *NOT* need to modify them.
export POSTFIX_ROOTDIR='/etc/postfix'
export POSTFIX_CHROOT_DIR='/var/spool/postfix'
export POSTFIX_CERTS_DIR="${POSTFIX_ROOTDIR}/certs"

export POSTFIX_FILE_MAIN_CF="${POSTFIX_ROOTDIR}/main.cf"
export POSTFIX_FILE_MASTER_CF="${POSTFIX_ROOTDIR}/master.cf"
export POSTFIX_FILE_ALIASES="${POSTFIX_ROOTDIR}/aliases"

# If you use courier-maildrop, transport should be 'maildrop'
# We use dovecot here.
export TRANSPORT='dovecot'

# LDAP/MYSQL lookup configuration files.
# LDAP lookup.
export ldap_virtual_mailbox_domains_cf="${POSTFIX_ROOTDIR}/ldap_virtual_mailbox_domains.cf"
export ldap_transport_maps_cf="${POSTFIX_ROOTDIR}/ldap_transport_maps.cf"
export ldap_accounts_cf="${POSTFIX_ROOTDIR}/ldap_accounts.cf"
export ldap_virtual_mailbox_maps_cf="${POSTFIX_ROOTDIR}/ldap_virtual_mailbox_maps.cf"
export ldap_virtual_alias_maps_cf="${POSTFIX_ROOTDIR}/ldap_virtual_alias_maps.cf"
export ldap_sender_login_maps_cf="${POSTFIX_ROOTDIR}/ldap_sender_login_maps.cf"
export ldap_recipient_bcc_maps_domain_cf="${POSTFIX_ROOTDIR}/ldap_recipient_bcc_maps_domain.cf"
export ldap_recipient_bcc_maps_user_cf="${POSTFIX_ROOTDIR}/ldap_recipient_bcc_maps_user.cf"
export ldap_sender_bcc_maps_domain_cf="${POSTFIX_ROOTDIR}/ldap_sender_bcc_maps_domain.cf"
export ldap_sender_bcc_maps_user_cf="${POSTFIX_ROOTDIR}/ldap_sender_bcc_maps_user.cf"

# MySQL lookup.
export mysql_virtual_mailbox_domains_cf="${POSTFIX_ROOTDIR}/mysql_virtual_mailbox_domains.cf"
export mysql_transport_maps_cf="${POSTFIX_ROOTDIR}/mysql_transport_maps.cf"
export mysql_virtual_mailbox_maps_cf="${POSTFIX_ROOTDIR}/mysql_virtual_mailbox_maps.cf"
export mysql_virtual_mailbox_limit_maps_cf="${POSTFIX_ROOTDIR}/mysql_virtual_mailbox_limit_maps.cf"
export mysql_virtual_alias_maps_cf="${POSTFIX_ROOTDIR}/mysql_virtual_alias_maps.cf"
export mysql_sender_login_maps_cf="${POSTFIX_ROOTDIR}/mysql_sender_login_maps.cf"
export mysql_sender_bcc_maps_domain_cf="${POSTFIX_ROOTDIR}/mysql_sender_bcc_maps_domain.cf"
export mysql_sender_bcc_maps_user_cf="${POSTFIX_ROOTDIR}/mysql_sender_bcc_maps_user.cf"
export mysql_recipient_bcc_maps_domain_cf="${POSTFIX_ROOTDIR}/mysql_recipient_bcc_maps_domain.cf"
export mysql_recipient_bcc_maps_user_cf="${POSTFIX_ROOTDIR}/mysql_recipient_bcc_maps_user.cf"
